/*
 * $Id$
 */
package py.windmill.web;

import py.windmill.action.Application;
import py.windmill.action.DefaultRequestMapper;
import py.windmill.action.RequestMapper;
import py.windmill.action.Route;

import static py.windmill.action.Route.*;


/**
 *
 * @author myang
 */
public class MyApplication extends Application {

    @Override
    public RequestMapper requestMapper() {
        return new DefaultRequestMapper()
                .add(redirect("/dict", "/dict/"),
                     new Route(new DictionaryAction()),
                     redirect("/reading", "/reading/"),
                     new Route(new ReadingAction()));
    }

    @Override
    public String jspTemplate() {
        return "/WEB-INF/pages/template.jsp";
    }
}
